package com.yemast.readertesst.view

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.bumptech.glide.Glide
import com.yemast.readertesst.R
import com.yemast.readertesst.model.BookDetail
import kotlinx.android.synthetic.main.ac_book_detail_view.*

class BookDetailListAc : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.ac_book_detail_view)
        val bookdetail = intent.getSerializableExtra("detail") as BookDetail

        if (bookdetail == null) {
            finish()
            return
        }
        Glide.with(this).load(bookdetail.corvrer).into(imageView)


        bookdetail.run {
            tv_book_name.text = name
            tv_book_auther.text = author
            tv_book_sort.text = sort
            tv_book_updatetime.text = update
            tv_book_newpage.text = newst
            tv_book_status.text = update
        }
    }
}